Ext.onReady(function(){

	var _window = new Ext.Window({
		title:'登录',
		layout:'form',
		width:280,
		height:150,
		labelWidth:50,
		plain:true,
		defaults:{width:180},
		bodyStyle:'padding:3px',
		items:[{
			xtype:'textfield',
			fieldLabel:'姓名',
			id:'username'
		},{
			xtype:'textfield',
			fieldLabel:'密码',
			type:'password'
		}],
		buttons:[{
			text:'确定',
			handler:function(){
				/*alert(this.ownerCt.ownerCt.items.first().getValue());
				alert(this.ownerCt.ownerCt.items.itemAt(0).getValue());
				alert(Ext.getCmp("username").getValue());
				alert(this.text);this就是公布handler的对象*/
				var _coll = this.ownerCt.ownerCt.items;
				alert(_coll.first().getValue());
				alert(_coll.itemAt(1).getValue());
			}
		}]
	});
	_window.show();
});
